<?php require_once('templates/header.php')?>
<script>
 $(document).ready(function(){
		$('#pageDiv a').live('click',function(){
			var url = $(this).attr('href');//获取当前页码和当前页URL admin.php?p=;
			//alert(url);
			$.ajax({
				   type: "GET",
				   url: url,
				   data: {
					ajax:1
						},//传输参数 ajax的标识位
					dataType:"json",//指定后台返回的数据格式必须是json，否则ajax失败
				   //dataType:"json",//指定返回值为JSON，否则ajax失败
				   success: function(json){
					 //alert(msg);
					 var l = '';
					 for(var i =0;i<json.result.length;i++){
						l+='<tr>';
						l+='<td><input type="checkbox" name="" /></td>';
						l+='<td>'+json.result[i].id+'</td>';
						l+='<td>'+json.result[i].adminname+'</td>';
						l+='<td>'+json.result[i].email+'</td>';
						l+='<td><a href="admin.php?act=edi&id='+json.result[i].id+'"><img src="resources/images/user_edit.png" alt="" title="" border="0" /></a></td>'
						l+='<td><a href="admin.php?act=del&id='+json.result[i].id+'" class="ask"><img src="resources/images/trash.png" alt="" title="" border="0" /></a></td>'
						l+='</tr>';
					 }
					 $('#listDiv').html(l);
					 $('#pageDiv').html(json.page);
				   }
				});
				return false;
		});
		$('form').submit(function(){
			if('' == $('[name ="keywords"]').val())
			{
				alert('请输入关键字！');
				return false;
			}
		});
});

</script>


   
                    
                    
                    
    <div class="center_content">  
    
     <?php require_once('templates/left_content.php')?>      
    

    <div class="right_content">            
        
    <h2>Products Categories Settings</h2> 
                    
                    
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
    <thead>
    	<tr>
        	<th scope="col" class="rounded-company"></th>
            <th scope="col" class="rounded">ID</th>
            <th scope="col" class="rounded">用户名</th>
            <th scope="col" class="rounded">邮件</th>
            <th scope="col" class="rounded">Edit</th>
            <th scope="col" class="rounded-q4">Delete</th>
        </tr>
    </thead>
        <tfoot>
    	<tr>
        	<td colspan="6" class="rounded-foot-left"><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</em></td>
        	<td class="rounded-foot-right">&nbsp;</td>

        </tr>
    </tfoot>
    <tbody id = "listDiv">
		<?php foreach($list as $k):?>
    	<tr>
        	<td><input type="checkbox" name="" /></td>
			<td><?php echo $k['id']?></td>
            <td><?php echo $k['adminname']?></td>
            <td><?php echo $k['email']?></td>

            <td><a href="admin.php?act=edi&id=<?php echo $k['id']?>"><img src="resources/images/user_edit.png" alt="" title="" border="0" /></a></td>
            <td><a href="admin.php?act=del&id=<?php echo $k['id']?>" class="ask"><img src="resources/images/trash.png" alt="" title="" border="0" /></a></td>
        </tr>
		<?php endforeach;?>
    </tbody>
</table>

	 <a href="#" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
     <a href="#" class="bt_blue"><span class="bt_blue_lft"></span><strong>View all items from category</strong><span class="bt_blue_r"></span></a>
     <a href="#" class="bt_red"><span class="bt_red_lft"></span><strong>Delete items</strong><span class="bt_red_r"></span></a> 
     
     <?php if (!empty($pagelink)):?>
        <div class="pagination" id = "pageDiv">
			<?php echo $pagelink;   //输出?>
        </div> 
     <?php endif;?>
	 
     <h2>Warning Box examples</h2>
      
     <div class="warning_box">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.
     </div>
     <div class="valid_box">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.
     </div>
     <div class="error_box">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.
     </div>  
           
     <h2>Nice Form example</h2>
     
         <div class="form">
         <form action="" method="post" class="niceform">
         
                <fieldset>
                    <dl>
                        <dt><label for="email">Email Address:</label></dt>
                        <dd><input type="text" name="" id="" size="54" /></dd>
                    </dl>
                    <dl>
                        <dt><label for="password">Password:</label></dt>
                        <dd><input type="text" name="" id="" size="54" /></dd>
                    </dl>
                    
                    
                    <dl>
                        <dt><label for="gender">Select categories:</label></dt>
                        <dd>
                            <select size="1" name="gender" id="">
                                <option value="">Select option 1</option>
                                <option value="">Select option 2</option>
                                <option value="">Select option 3</option>
                                <option value="">Select option 4</option>
                                <option value="">Select option 5</option>
                            </select>
                        </dd>
                    </dl>
                    <dl>
                        <dt><label for="interests">Select tags:</label></dt>
                        <dd>
                            <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Web design</label>
                            <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Business</label>
                            <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Simple</label>
                            <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Clean</label>
                        </dd>
                    </dl>
                    
                    <dl>
                        <dt><label for="color">Select type</label></dt>
                        <dd>
                            <input type="radio" name="type" id="" value="" /><label class="check_label">Basic</label>
                            <input type="radio" name="type" id="" value="" /><label class="check_label">Medium</label>
                            <input type="radio" name="type" id="" value="" /><label class="check_label">Premium</label>
                        </dd>
                    </dl>
                    
                    
                    
                    <dl>
                        <dt><label for="upload">Upload a File:</label></dt>
                        <dd><input type="file" name="upload" id="upload" /></dd>
                    </dl>
                    
                    <dl>
                        <dt><label for="comments">Message:</label></dt>
                        <dd><textarea name="comments" id="comments" rows="5" cols="36"></textarea></dd>
                    </dl>
                    
                    <dl>
                        <dt><label></label></dt>
                        <dd>
                            <input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">I agree to the <a href="#">terms &amp; conditions</a></label>
                        </dd>
                    </dl>
                    
                     <dl class="submit">
                    <input type="submit" name="submit" id="submit" value="Submit" />
                     </dl>
                     
                     
                    
                </fieldset>
                
         </form>
         </div>  
      
     
     </div><!-- end of right content-->
            
                    
  </div>   <!--end of center content -->               
                    
                    
    
    
    <div class="clear"></div>
    </div> <!--end of main content-->
	
<?php require_once('templates/footer.php')?>   
